﻿#include<iostream>
using namespace std;
int main() {
	int a, b, c;
	cin >> a;
	cin >> b;
	c = a > b ? a : b + 5000000;//先算+500000
	cout << c << endl;

	int cs;
	cin >> cs;
	int end;

	end = cs ? (10000 / cs) : 0;//等价于if(cs)

	cout << end;
}